/*j07c8riwYnz20MYibuDbtFpXu1B9L8o7bHF7kaxWDlXY5AHxCsHt8LK/qeCf6fx7*/
/*
 * @Author: xiahui 
 * @PageInfo: 列表翻页
 * @Date: 2019-01-10 17:16:15 
 * @Last Modified by: xiahui
 * @Last Modified time: 2019-07-25 18:57:14
 */
import { ajax } from 'nc-lightapp-front';
import { AREA, PAGECODE, URL } from '../../constance';
import { buttonControl } from '../viewControl/buttonControl';

export default function(props, config, pks) {
	let reqData = {
		pks: pks,
		pagecode: PAGECODE.listPagecode
	};
	//得到数据渲染到页面
	ajax({
		url: URL.pageQuery,
		data: reqData,
		success: function(res) {
			if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
				props.dealFormulamsg(
					res.formulamsg //参数一：返回的公式对象
				);
			}
			if (res.success) {
				if (res.data) {
					props.table.setAllTableData(AREA.listTableId, res.data[AREA.listTableId]);
				} else {
					props.table.setAllTableData(AREA.listTableId, { rows: [] });
				}
				buttonControl.call(this, props);
			}
		}
	});
}

/*j07c8riwYnz20MYibuDbtFpXu1B9L8o7bHF7kaxWDlXY5AHxCsHt8LK/qeCf6fx7*/